import request from "@/config/axios";

const baseUrl = "http://localhost:3000/dev-api/activity";
const scoreUrl = "http://localhost:3000/dev-api";

// 分页列社团活动
export const fetchGetActivityList = (params: any): Promise<IResponse> => {
  return request.get({ url: `${baseUrl}/list`, params });
};


// 分页列参与活动的人
export const fetchGetActivityPersonList = (params: any): Promise<IResponse> => {
  return request.get({ url: `${baseUrl}/personList`, params });
};


// 获取社团活动分数列表
export const fetchGetScoreList = (): Promise<IResponse> => {
  return request.get({ url: `${scoreUrl}/scores/list`});
};


// 发布社团活动
export const fetchPostActivity = (data: any): Promise<IResponse> => {
  return request.post({ url: `${baseUrl}`, data });
};

// 根据Id修改活动
export const fetchPutActivity = (data: any): Promise<IResponse> => {
  return request.put({ url: `${baseUrl}`, data });
};


